<template>
      <div class="main-zc">
        <van-nav-bar
          title="找回密码"
          left-arrow
          @click-left="goLogin"
        />
        <div class="zc-container">
          <van-form @submit="onSubmit">
            <span class="zc-lable">新密码</span>
            <van-field class="van-cell"
                       v-model="username"
                       label=""
                       left-icon="user-o"
                       placeholder="请输入密码"
            />

            <span class="zc-lable" >确认密码</span>
            <van-field
              v-model="password"
              type="password"
              left-icon="bag-o"
              label=""
              placeholder="请输入密码"
            />
            <div style="margin: 16px;">
              <van-button  block type="info" native-type="submit" >
                确定
              </van-button>
            </div>
          </van-form>

        </div>

      </div>

    </template>

  <script>
    export default {


      data() {
        return {
          username: '',
          password: '',
          re_password:false,
          is_yzm:false,
        }
      },

      methods: {
        onSubmit(values) {
          if( this.password==''){
            this.$notify({ type: 'warning', message: '请输入最新密码' })
            return false
          }
          console.log('submit', values);
          this.$dialog.alert({
            title: '提示',
            message: '修改密码成功!'
          }).then(() => {
            this.$router.push({path:'/'});
          })
        },

        goLogin(){
          history.go(-1)
        }
      }
    }
  </script>

  <style scoped>
    .zc-container{
      /*margin:10% auto;*/
      margin-top: 60px;
      padding: 0 20px;
    }
    .van-cell{
      padding-left: 0px;
    }
    .zc-title{
      font-size: 80px;
      text-align: center;
      margin-bottom: 80px;
    }
    .zc-lable{
      /*margin-left: 15px;*/
      margin-right: 80%;
      margin-top: 20px;
      display: block;
      font-size: 16px;
      font-weight: bolder;
    }
  </style>


